The primary purpose of an IFrame is to render content (hereinafter “untrusted content”) within a particular window of a larger user interface in a manner that the window looks like an integrated part of the larger user interface. The content is “untrusted” in that it is generated by untrusted code (often script). The IFrame provides an isolation function that prevents the script from doing harmful actions to objects outside of the IFrame. After all, the script provided within an IFrame is often provided by a third-party entity.
There is typically one IFrame per window. The main application content is typically displayed in one IFrame. Furthermore, there is a dedicated IFrame for each window having untrusted content. In conventional user interface systems, there might be one or two IFrames (other than the primary IFrame for the main application content) that operate to render untrusted content on respective portions of the display. For instance, in a browser application, the main browser display might be rendered by one IFrame. There might be a small stock update window in another corner of the display that regularly updates a few designated stock prices. The content of that small window is also driven by a separate IFrame. Thus, in conventional approaches, there is a one-to-one correspondence between IFrames and windows that display untrusted content.